<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common::common(title='用户列表')">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" ></meta>
</head>
<script type="text/javascript" th:src="@{/js/basic/usergroup.js}"></script>
<body>
	<div id="app">
	  <input type="hidden" id="groupId" v-model="groupId" th:value="${groupId}" />
	  <input type="hidden" id="isAdmin" v-model="isAdmin" th:value="${isAdmin}" />
	  <el-button-group style="padding-bottom:10px;">
		  <el-button type="primary" size="mini" @click="goBack"><i class="el-icon2-arrowleft" ></i> 返回</el-button>
		  <el-button type="primary" size="mini" @click="addUserToGroup"><i class="layui-icon layui-icon-group"></i> 增加组内用户</el-button>
		  <el-button type="primary" size="mini" @click="removeUser"><i class="layui-icon layui-icon-friends"></i> 移除组内用户</el-button>
		  <el-button type="primary" size="mini" @click="setAdmin('1')"><i class="layui-icon layui-icon-face-smile"></i> 设置为管理员</el-button>
		  <el-button type="primary" size="mini" @click="setAdmin('0')"><i class="layui-icon layui-icon-face-cry"></i> 取消管理员</el-button>
	  </el-button-group>
	  <el-table  
   	    ref="userGroupDatagrid" 
   	    :data="datagrid"
	    tooltip-effect="dark"
	    style="width: 100%;"
	    max-height="300"
	    @row-click="datagridSelect"
	    border
	    highlight-current-row
	    >
	    <el-table-column type="index" width="30"></el-table-column>
		    <el-table-column prop="name" label="账号" show-overflow-tooltip> </el-table-column>
		    <el-table-column prop="nickName" label="昵称" show-overflow-tooltip> </el-table-column>
		    <el-table-column prop="isAdmin" label="是否管理员" show-overflow-tooltip> </el-table-column>
	  </el-table>
	</div>
</body>
</html>